<template>
	<view class="page page-agreement p-10px">
		<view v-html="HTML"></view>
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	import api from '@/api'

	const { type } = defineProps({
		type: String		//privacy 隐私政策  agreement 用户协议
	})

	uni.setNavigationBarTitle({
		title: type == 'privacy'? '隐私政策' : '用户协议'
	})

	const HTML = ref('')
	console.log('---type---',type);
	async function getData() {
		HTML.value = await api[type == 'privacy'? 'getPrivacy' : 'getAgreement']()
	}
	getData()
	 

</script>
